-- GENERATED SPELL FOR [Skyguard Ace] --


function spell0_23377(pUnit, Event) --@Ancient Flames,n/a--
pUnit:FullCastSpellOnTarget(40657,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23377', 19000, 1)
end

function spell1_23377(pUnit, Event) --@Skyguard Flare,n/a--
pUnit:FullCastSpellOnTarget(40655,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23377', 2000, 1)
end

function Sorts_23377(pUnit, Event)
local choix_sorts_23377 = math.random(0, 1)
if choix_sorts_23377 == 0 then
pUnit:RegisterEvent('spell0_23377', 1, 1)
end
if choix_sorts_23377 == 1 then
pUnit:RegisterEvent('spell1_23377', 1, 1)
end
end

function mob23377_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23377', math.random(1500, 3000), 1)
end

function mob23377_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23377_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23377_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23377, 1, 'mob23377_Action')
RegisterUnitEvent(23377, 2, 'mob23377_Leave')
RegisterUnitEvent(23377, 3, 'mob23377_Kill')
RegisterUnitEvent(23377, 4, 'mob23377_Die')
